package com.mrd.gtimp.business.entity;

import com.mrd.gtimp.base.entity.Company;
import com.mrd.gtimp.base.entity.User;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

/**
 * <p> application name: gtimp <p> copyright: Copyright@2012 明睿达科技有限公司
 */

/**
 * 报关资料发送提醒信息
 *
 * @author luob
 */
@Entity(name = "T_BIZ_DECLARATION_INFORM")
public class DeclarationInform implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    private String id;
    /**
     * 相关报关业务
     */
    @OneToOne
    @JoinColumn(name = "BIZ_ID", updatable = false)
    private Declaration declaration;
    /**
     * 资料发送
     */
    @SuppressWarnings("deprecation")
    @OneToOne
    @JoinColumn(name = "SENDREMIND_ID")
    @Cascade(value = {CascadeType.SAVE_UPDATE, CascadeType.DELETE_ORPHAN})
    private SendRemind sendRemind;
    /**
     * 提醒发出者，客户帐号
     */
    @ManyToOne
    @JoinColumn(name = "CREATOR_ID", updatable = false)
    private User creator;
    /**
     * 提醒确认接收人，供应商用户
     */
    @ManyToOne
    @JoinColumn(name = "CONFIRMER_ID")
    private User confirmer;
    /**
     * 提醒创建时间
     */
    @Column(name = "CREATE_TIME", updatable = false)
    private Date createTime;
    /**
     * 提醒确认时间
     */
    @Column(name = "CONFIRM_TIME")
    private Date confirmTime;
    /**
     * 客户公司
     */
    @ManyToOne
    @JoinColumn(name = "CUSTOMER_COM_ID", updatable = false)
    private Company customerCompany;
    /**
     * 供应商公司
     */
    @ManyToOne
    @JoinColumn(name = "SUP_COM_ID", updatable = false)
    private Company supCompany;
    /**
     * 确认接收状态，0未确认，1已确认
     */
    @Column(name = "CONFIRM_STATE")
    private String confirmState;
    /**
     * 确认接收人拓展信息
     */
    @Column(name = "CONFIRMER_EXT")
    private String confirmerExt;
    /**
     * 备注，250汉字长度限制
     */
    @Column(name = "REMARK")
    private String remark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public User getCreator() {
        return creator;
    }

    public void setCreator(User creator) {
        this.creator = creator;
    }

    public User getConfirmer() {
        return confirmer;
    }

    public void setConfirmer(User confirmer) {
        this.confirmer = confirmer;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date create_time) {
        this.createTime = create_time;
    }

    public Date getConfirmTime() {
        return confirmTime;
    }

    public void setConfirmTime(Date confirm_time) {
        this.confirmTime = confirm_time;
    }

    public Company getCustomerCompany() {
        return customerCompany;
    }

    public void setCustomerCompany(Company customer_company) {
        this.customerCompany = customer_company;
    }

    public Company getSupCompany() {
        return supCompany;
    }

    public void setSupCompany(Company sup_company) {
        this.supCompany = sup_company;
    }

    public String getConfirmState() {
        return confirmState;
    }

    public void setConfirmState(String confirm_state) {
        this.confirmState = confirm_state;
    }

    public String getConfirmerExt() {
        return confirmerExt;
    }

    public void setConfirmerExt(String confirmer_ext) {
        this.confirmerExt = confirmer_ext;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Declaration getDeclaration() {
        return declaration;
    }

    public void setDeclaration(Declaration declaration) {
        this.declaration = declaration;
    }

    public SendRemind getSendRemind() {
        return sendRemind;
    }

    public void setSendRemind(SendRemind sendRemind) {
        this.sendRemind = sendRemind;
    }

}
